<?php
class classWindow{
	public function ShowByAJAX($sSRCElementID, $Content, $IsChild=false){
		$_Skin = new classTemplate();
		if(!$IsChild){
			$setInvisibleShadow = '
                document.getElementById(\'shadow_container\').style.visibility=\'hidden\';
            ';
            $setCloseImageName = 'float_window_close_image';
            $setCloseTextName = 'float_window_close_text';
        }
		else{
			$setInvisibleShadow='';
            $setCloseImageName = 'float_child_window_close_image';
            $setCloseTextName = 'float_child_window_close_text';
        }

        if(_DBG_MODE_=='YES') $dgbInput= '<input type="text" id="wndDBGinput" value="VALUE">'; else $dgbInput='';
			
		return '
			<div class="css_float_window_DST"
                onmouseout="
                    document.getElementById(\''.$setCloseImageName.'\').style.visibility=\'hidden\';
                    document.getElementById(\''.$setCloseTextName.'\').style.visibility=\'hidden\';
                "
                onmouseover="
                    document.getElementById(\''.$setCloseImageName.'\').style.visibility=\'visible\';
                    document.getElementById(\''.$setCloseTextName.'\').style.visibility=\'visible\';
                "
			>
                '.$dgbInput.'
                <img
                    id="'.$setCloseImageName.'"
                    class="float_window_close_image"
                    src="'.$_Skin->getActual().'/images/close.png"
                    alt="'._i18n_system_CLOSE_.'"
                    onclick="
                        '.$setInvisibleShadow.'
                        document.getElementById(\''.$sSRCElementID.'\').innerHTML=\'\';
                    "
                    onload="
                        document.getElementById(\'shadow_container\').style.visibility=\'visible\';
                        document.getElementById(\''.$sSRCElementID.'\').style.top = getWinTopPosition(\''.$sSRCElementID.'\');
                        updateShadowSize();
                    "
                >
                <font
                    id="'.$setCloseTextName.'"
                    class="float_window_close_text"
                    onclick="
                        '.$setInvisibleShadow.'
                        document.getElementById(\''.$sSRCElementID.'\').innerHTML=\'\';
                    "
                >
                        '._i18n_system_CLOSE_.'
                </font>
                '.$Content.'
			</div>
		';
		
	}
	
	public function ShowByURL($Content,$CloseURL){
		$_Skin = new classTemplate(); //function(){
		return '
			<div id="css_NOAJAX_flow_container" 
				onmouseout="
					document.getElementById(\'float_noajax_window_close_image\').style.visibility=\'hidden\';
					document.getElementById(\'float_noajax_window_close_text\').style.visibility=\'hidden\';
				"
				onmouseover="
					document.getElementById(\'float_noajax_window_close_image\').style.visibility=\'visible\';
					document.getElementById(\'float_noajax_window_close_text\').style.visibility=\'visible\';
				"
			>
				<a
					href="'.$CloseURL.'" 
					id="float_noajax_window_close_image"
				>
					<img 
						src="'.$_Skin->getActual().'/images/close.png"
						border="0"
						alt="'._i18n_system_CLOSE_.'"
						onload="setTimeout(function(){document.getElementById(\'shadow_container\').style.visibility=\'visible\';updateShadowSize();},80);"
					>
				</a>
				<a
					href="'.$CloseURL.'"
					id="float_noajax_window_close_text"
				>
					'._i18n_system_CLOSE_.'
				</a>
				'.$Content.'
			</div>
		';
	}
}
?>